<template>
	<view class="shoppingconfirm">
		<view class="address-view" v-if="addressArr.length>0">
			<text class="iconfont icon-location location-icon"></text>
			<view class="content">
				<view class="name-tel">
					<text class="name">{{addressArr[0].receiver}}</text>
					<text class="tel">{{addressArr[0].receiverPhone}}</text>
				</view>
				<wxc-elip class="address" :line="2">{{addressArr[0].province}} {{addressArr[0].city}} {{addressArr[0].town}}
					{{addressArr[0].address}}</wxc-elip>
			</view>
			<view class="seperator"></view>
			<text class="edit" @click="goToAddressEdit">编辑</text>
		</view>

		<view class="add" @click="addAddress" v-if="addressArr.length==0">
			<text class="iconfont icon-plus-circle icon"></text>
			新增收货地址
		</view>
			<!-- 直接购买 -->
			<view class="infos-detail" v-if="isone">
				<view class="infos-left">
					<view class="infos-img">
						<image :src="contents.listImage"></image>
					</view>
				</view>
				<view class="infos-right">
					<view class="infos-title">
						<text>{{contents.title}}</text>
					</view>
					<view class="infos-price" v-if="!contents.isIntegral">
						<text>￥</text>
						<text>{{contents.travelEbusinessGoodsTemp.specSellingPrice}}</text>
						<text> × 1</text>
					</view>
					<view class="infos-price" v-if="contents.isIntegral">
						<!-- <text></text> -->
						<text>{{contents.needIntegral}}</text>
						<text>积分</text>
						<text> × 1</text>
					</view>
				</view>
				<view class="line-shopping">
					<view></view>
				</view>
			</view>
			<!-- 购物车购买 -->
		<block v-for= "(item,index) in shoppinglist" :key="index" v-else>
				<view class="infos-detail">
					<view class="infos-left">
						<view class="infos-img">
							<image :src="item.listImage"></image>
						</view>
					</view>
					<view class="infos-right">
						<view class="infos-title">
							<text>{{item.title}}</text>
						</view>
						<view class="infos-price">
							<text>￥</text>
							<text>{{item.travelEbusinessGoodsTemp.specSellingPrice}}</text>
							<text> × {{item.travelEbusinessGoodsTemp.shoppingCarNum}}</text>
						</view>
					</view>
				</view>
				<view class="line-shopping">
					<view></view>
				</view>
			</block>
			<view class="freight">
				<view class="kuaidi"><text>运费</text></view>
				<view class="qian"><text>￥</text><text>{{express}}</text></view>
			</view>
			<!-- 优惠券 -->
			<view class="desc between">
				<view class="left-text">
					<text>优惠券</text>
					<view v-if="couponForm==1" class="left-text-satis">
						<text>满 {{satisfyAmount}}减 {{discountAmount}}</text>
					</view>
					<view v-if="couponForm==2" class="left-text-satis">
						<text>商品优惠券 {{discountAmount}}</text>
					</view>
				</view>
				<view class="contain-box">
					<text class="latter" @click="pleaseChoose()" v-if="control">{{chooses}}</text>
					<text class="latter-money" v-else @click="couponChoose()">{{money}}{{reason}}</text>
					<choose custom-class="bottom-popup" position="bottom" v-model="showBottomVisible" :maskClose="false">
						<view class="refund-reason"><text>优惠券</text></view>
						<view class="center-contain">
							<view class="reason" v-for="(item,i) in couponList" :key="i" >
									<view  @click="reasonClick(item)" v-if="item.couponForm==1">
										<text>满 {{item.satisfyAmount}}减 {{item.discountAmount}}</text>
										<view class="source" :class="[item.checked?'glance-shop-cart-itemselected-img':'']"></view>
									</view>
									<view  @click="reasonClick(item)" v-if="item.couponForm==2">
										<text>商品优惠券 {{item.discountAmount}}</text>
										<view class="source" :class="[item.checked?'glance-shop-cart-itemselected-img':'']"></view>
									</view>
								</view>
								<view class="reason noReason" v-if="couponList!=''">
									<view @click="noCancel('1')">
											<text>不使用优惠券</text>
											<view class="source" :class="[noCoupon?'glance-shop-cart-itemselected-img':'']"></view>
									</view>
								</view>
								<view class="reason-foot" @click="noCancel()" :class="[couponList.length<3?'reason-foot-position':'']">
									<view>
										<text>取消</text>
									</view>
								</view>
							</view>
					</choose>
					<text class="dayu">></text>
				</view>
			</view>
			<!-- <view class="infos">
				<view class="title">{{contents.title}}</view>
			
				<view class="line" style="margin-top: 23upx;"></view>
			
				<view class="info">
					<text class="tips">总价</text>
					<view>
						<text class="unit">￥</text>
						<text class="price">{{contents.travelEbusinessGoodsTemp.specSellingPrice}}</text>
					</view>
				</view>
			</view> -->
			<!-- 直接购买 -->
			<view class="bottom last-fixed" v-if="isone">
				<view class="btn-left">
					<view class="text-view">
						<text class="text-nor">共{{until}}件，</text>
						<text class="text-nor">合计：</text>
						<text class="text-unit">{{contents.isIntegral ? '积分' :'￥'}}</text>
						<text class="price" v-if="couponForm!=''">{{directCoupon}}</text>
						<text class="price" v-else>{{contents.isIntegral?contents.needIntegral:directShopp}}</text>
					</view>
				</view>
				<view class="btn-right" @click="buyNow()" v-if="!contents.isIntegral">提交订单</view>
				<view class="btn-right" @click="buyIntegral()" v-if="contents.isIntegral">立即兑换</view>
			</view>
			<!-- 购物车购买 -->
			<view v-else class="bottom">
				<view class="btn-left">
					<view class="text-view">
						<text class="text-nor">共{{until}}件，</text>
						<text class="text-nor">合计：</text>
						<text class="text-unit">￥</text>
						<text class="price">{{couponForm!=''?totalCoupon:totalamount}}</text>
					</view>
				</view>
				<view class="btn-right" @click="buyNow()">提交订单</view>
			</view>
		</view>
</template>

<script>
	import wxcElip from '@/components/custom/wxc-elip.vue';
	import choose from '../../components/s-popup/index.vue';
	export default {
		components: {
			wxcElip,
			choose
		},
		data() {
			return {
				memberId: '',
				goodsnum: 1,
				message: "备注信息",
				price: 0,
				goodsName: "",
				goodIntroduce: "",
				addressArr: [],
				item: [],
				//直接购买商品列表
				contents: [],
				//购物车购买商品列表
				shoppinglist:[],
				//判断是直接购买还是购物车购买
				isone:true,
				ismore:false,
				express:'',
				//共x件
				until:'1',
				// outright:'',
				//优惠券的数额
				reason:'',
				//是否弹框
				showBottomVisible:false,
				//优惠券列表
				couponList:[],
				//请选择和-￥x的切换
				control:true,
				//符号
				money:'',
				//判断不使用优惠券是否选中
				noCoupon:false,
				//满足金额
				satisfyAmount:'',
				//优惠金额
				discountAmount:'',
				//(1-满减券 2-商品券)
				couponForm:'',
				//购物车加运费的合计
				totalamount:'',
				//购物车不加运费购买的合计
				totalCoupon:'',
				//直接购买加运费的合计
				directShopp:'',
				//直接购买不加运费购买的合计
				directCoupon:'',
				//优惠券ID
				couponId:'',
				chooses:'请选择'
				
			};
		},
		onLoad(options) {
			
			var that = this
			var contents = {}
			uni.getStorage({
				key: 'totalamount',
				success:(res) => {
					console.log("取到的totalamount对象", res.data);
					this.totalamount = res.data
				}
			})
			uni.getStorage({
				key: 'contents',
				success: (res) => {
					let freight=[]
					console.log("取到的contents对象", res.data);
					//判断是直接购买还是购物车购买
					//购物车购买
					if(res.data.length){
						
						//共x件
						that.until = res.data.length
						that.shoppinglist = res.data
						
						console.log("shoppinglist---->", that.shoppinglist)
						that.isone=false
						
						that.shoppinglist.forEach(item => {
							freight.push({
								goodsId:item.travelEbusinessGoodsTemp.goodsId,
								num:item.travelEbusinessGoodsTemp.shoppingCarNum})
							})
					}else{
						//直接购买
						that.contents = res.data.data
						freight.push({
							goodsId: that.contents.travelEbusinessGoodsTemp.goodsId,
							num: that.goodsnum,
							})
					}
					//获取运费
					this.getYunFei(freight);
					//获取优惠卷列表(结算时)
					this.getCouponListInClose()
				}
			});
		},
		onShow() {
			//获取地址列表
			this.getAddressList()
			//#ifdef H5
			document.title = '订单确认';
			//#endif
		},
		methods: {
			//取消和不使用优惠券的方法
			noCancel:function(type){
				this.couponList.forEach(res => {
					res.checked = false
				})
				//是否弹框
				this.showBottomVisible=false
				//请选择和-￥x的切换
				this.control=true
				//优惠券的数额
				this.reason=""
				//符号
				this.money=""
				//判断不使用优惠券是否选中
				this.noCoupon=false
				//满足金额
				this.satisfyAmount=""
				//优惠金额
				this.discountAmount=""
				//(1-满减券 2-商品券)
				this.couponForm=""
				//优惠券Id
				this.couponId=""
				if(type=="1"){
					this.noCoupon=true
				}
			},
			//请选择
			pleaseChoose:function(){
				if(this.pub.checkUserInfo()){
					//是否弹框
					this.showBottomVisible=true
					//请选择和-￥x的切换
					this.control=false
				}
			},
			//—￥x
			couponChoose:function(){
				//是否弹框
				this.showBottomVisible=true
				//请选择和-￥x的切换
				this.control=false
			},
			//使用优惠券
			reasonClick:function(item){
				//判断不使用优惠券是否选中
				this.noCoupon=false
				this.couponList.forEach(res=>{
					res.checked=false
				})
				
				item.checked = !item.checked;
				
				if(item.checked==true){
					
					this.reason = item.discountAmount
					this.money='-￥'
					this.satisfyAmount=item.satisfyAmount
					this.discountAmount=item.discountAmount
					this.couponForm=item.couponForm
					if(this.isone){
						//直接购买不加运费的合计
						this.directCoupon=parseFloat(this.directShopp)-parseFloat(this.express)
					}else{
						this.totalCoupon=parseFloat(this.totalamount)-parseFloat(this.express)
					}
					console.log("totalCoupon--------------->",this.totalCoupon)
					console.log("directCoupon-------------->",this.directCoupon)
					//如果是满减券
					if(item.couponForm==1){
						//用于商品券 / 满减券
						//如果购物车 / 直接购买，去掉运费的总价 < satisfyAmount
						if(this.isone?this.directCoupon<item.satisfyAmount:this.totalCoupon<item.satisfyAmount){
							console.log("totalCouponsssssssss",this.totalCoupon)
							console.log("directCouponssssssss",this.directCoupon)
							item.checked=false
							this.showBottomVisible=false
							this.control=true
							this.reason=""
							this.money=""
							this.noCoupon=false
							this.satisfyAmount=""
							this.discountAmount=""
							this.couponForm=""
							this.pub.showError("商品不满足优惠金额")
							
						}
						
				}else{
					//用于商品券
					//如果购物车/直接购买，去掉运费的总价 < discountAmount
					if(this.isone?this.directCoupon<item.discountAmount:this.totalCoupon<item.discountAmount){
						console.log("totalCouponsssssssss",this.totalCoupon)
						console.log("directCouponssssssss",this.directCoupon)
						item.checked=false
						this.showBottomVisible=false
						this.control=true
						this.reason=""
						this.money=""
						this.noCoupon=false
						this.satisfyAmount=""
						this.discountAmount=""
						this.couponForm=""
						this.pub.showError("优惠金额不能大于商品价格")
						
					}
				}
					if(this.isone){
						
						this.directCoupon=parseFloat(this.directShopp)-parseFloat(this.discountAmount)
					}else{
						this.totalCoupon=parseFloat(this.totalamount)-parseFloat(this.discountAmount)
					}
				}
				this.couponId=item.id
				this.showBottomVisible=false
				console.log("reason-------------->",this.reason)
				console.log("couponId------------>",this.couponId)
			},
			//获取地址列表
			getAddressList() {
				var params = {
					memberId: this.pub.getUserInfo().memberId,
					openid: this.pub.getUserInfo().openid
				}
				this.$postApi(this.$path.GET_ADDRESS_LIST, params).then(res => {
					console.log("返回的地址列表>>>>>>>>>>>>>>>>>----------", res.data)
					if (res.data.success) {
						this.addressArr = res.data.data.list
					} else {
						this.addressArr = []
					}

				})
			},
			addAddress() {
				uni.navigateTo({
					url: '/pages/shopping_new/addAddress?btn=保存',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},
			goToAddressEdit() {
				var addressArr = this.addressArr[0]
				uni.setStorage({
					key: 'addressArr',
					data: addressArr,
					success: function(res) {
						console.log("保存的>>>>>>>>>>>>>>>>>>", res)
						console.log('success');
					}
				});
				uni.navigateTo({
					url: '/pages/shopping_new/addAddress?btn=保存',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},
			//积分下单
			buyIntegral: function() {

				if (!this.pub.checkUserInfo()) {
					return
				}
				if (this.addressArr.length == 0) {
					uni.showToast({
						icon: 'none',
						title: "请先添加收货地址",
						duration: 3000
					})
					return
				}
				uni.showModal({
					title: '积分兑换',
					content: '确认兑换该商品吗？',
					showCancel: true,
					success: res => {
						
						if(res.confirm){
							uni.showLoading({
								title: "正在兑换...",
								mask: true
							})
							
							let params = {
								channelType: '5',
								memberId: this.pub.getUserInfo().memberId,
								integralGoodsId: this.contents.id,
								shippingAddressId: this.addressArr[0].id
							}
							
							this.$postApi(this.$path.INTEGRAL_SUBMIT_ORDER, params).then(res => {
								uni.hideLoading()
								console.log("积分商品下单返回结果----------------->", res.data)
								if (res.data.success) {
									this.pub.showError('兑换成功')
									setTimeout(function() {
										uni.redirectTo({
											url: '/pages/integral/integral?type=1',
											animationType: 'pop-in',
											animationDuration: 200
										})
									}, 2000)
							
								} else {
									this.pub.showError(res.data.error.errorMessage)
								}
							})
						}else{
							
						}
						
					}
				})

			},
			//购物下单
			buyNow() {
				
				if (!this.pub.checkUserInfo()) {
					return
				}
				if (this.addressArr.length == 0) {
					uni.showToast({
						icon: 'none',
						title: "请先添加收货地址",
						duration: 3000
					})
					return
				}
				uni.showLoading({
					title: "正在提交订单...",
					mask: true
				})
				
				var vos = [];
				//直接购买
				if(this.isone){
					vos.push({
						goodsId: this.contents.travelEbusinessGoodsTemp.goodsId,
						number: this.goodsnum,
					});
				}else{
					//购物车购买
					for(var i = 0;i < this.shoppinglist.length; i++){
					vos.push({
						goodsId:this.shoppinglist[i].travelEbusinessGoodsTemp.goodsId,
						number:this.shoppinglist[i].travelEbusinessGoodsTemp.shoppingCarNum,
						})
					}
					
				}

				// this.contents
				// this.contents.address = this.addressArr[0].province + this.addressArr[0].city + this.addressArr[0].town + this.addressArr[
				// 	0].address
				let params = {
					channelType: '5',
					memberId: this.pub.getUserInfo().memberId,
					// memberId: this.pub.getUserInfo().memberId || '4f0abd1af84d4168ba27ac00b63fcb2e',
					couponId: this.couponId,
					orderDetailTempList: vos,
					receiver: this.addressArr[0].receiver,
					receiverPhone: this.addressArr[0].receiverPhone,
					shippingAddressId: this.addressArr[0].id,
				};
				console.log("canshu",params)
				var that = this;
				this.$postApi(that.$path.SUBMIT_GOODS_ORDER, params).then(res => {
					uni.hideLoading();
					console.log("订单提交返回参数------------------->", res.data);
					let items = res.data;
					if (res.data.success) {
						
						let data = {}
						//直接购买返回的数据
						if(that.isone){
							
							data = {
								orderId: items.data.id,
								payAmount: that.couponForm!=''? that.directCoupon:that.directShopp,
							
							};
						}else{
							//购物车购买返回的数据
							data = {
								orderId: items.data.id,
								payAmount: that.couponForm!=''? that.totalCoupon:that.totalamount,
							};
						}
						uni.redirectTo({
							url: '/pages/scenicOrder/counter?data=' + JSON.stringify(data) + '&bustype=3',
							animationType: 'pop-in',
							animationDuration: 200
						});
					} else {
						//库存不足给提示
						this.pub.showError(res.data.error.errorMessage)
					}
				});
			},
			//获取运费
			getYunFei:function(freight){
				
				let params = {
					list:freight
				}
				this.$postApi(this.$path.ORDER_FREIGHT,params).then(res=>{
					console.log("获取运费返回结果--------------->",res)
					if(res.data.success){
						this.express = res.data.data
						this.express = parseFloat(this.express)
						if(this.isone){
							//直接购买的合计
							this.directShopp=parseFloat(this.contents.travelEbusinessGoodsTemp.specSellingPrice)+this.express
							
						}else{
							
							this.totalamount=parseFloat(this.totalamount)+this.express
						}
					}
				});
			},
			//获取优惠卷列表(结算时)
			getCouponListInClose:function(){
				//判断直接购买还是购物车购买
				//直接购买
				let couponGoodsId = []
				if(this.isone){
					
					couponGoodsId.push({
						
						goodsId: this.contents.travelEbusinessGoodsTemp.goodsId,
					});
				}else{
					//购物车购买
					for(var i = 0;i < this.shoppinglist.length; i++){
					couponGoodsId.push({
						
							goodsId:this.shoppinglist[i].travelEbusinessGoodsTemp.goodsId,
						})
					}
				}
				let params = {
					memberId: this.pub.getUserInfo().memberId,
					// memberId: this.pub.getUserInfo().memberId || "4f0abd1af84d4168ba27ac00b63fcb2e",
					goodsList:couponGoodsId
				}
				this.$postApi(this.$path.COUPON_LIST_IN_CLOSE,params).then(res => {
					console.log("优惠卷列表(结算时)------------>",res.data)
					if(res.data.success){
						
							this.couponList = res.data.data
							
							this.couponList.forEach(res=>{
								
									res.checked=false
									
							})
							
							console.log("this.couponList------------>",this.couponList)
					}else{
						
						this.chooses = "暂无优惠券"
						// this.pub.showError(res.data.error.errorMessage)
					}
				})
			},
		}
	};
</script>

<style lang="scss" scoped>
	.shoppingconfirm {
		min-height: 100%;
		background: #f5f5f5;
		padding-top: 20upx;
		padding-bottom: 240upx;
		image {
			width: 100%;
			height: 100%;
		}

		.address-view {
			display: flex;
			flex-direction: row;
			align-items: center;
			// margin-left: 24upx;
			// margin-top: 30upx;
			// width: 702upx;
			height: auto;
			background-color: #ffffff;
			background: #ffffff;
			box-sizing: border-box;
			padding: 40upx 40upx 40upx 25upx;
			border-radius: 6upx;
			margin-bottom: 20upx;
			.location-icon {
				font-size: 30upx;
				color: #666666;
				flex-shrink: 0;
			}

			.content {
				width: 485upx;
				height: auto;
				margin-left: 24upx;
				display: flex;
				flex-direction: column;

				.name-tel {
					display: flex;
					flex-direction: row;
					align-items: baseline;

					.name {
						font-size: 32upx;
						font-weight: bold;
						// line-height: 32upx;
						letter-spacing: 1px;
						color: #1a1a1a;
					}

					.tel {
						font-size: 24upx;
						margin-left: 20upx;
						font-weight: medium;
						line-height: 24upx;
						letter-spacing: 0px;
						color: #808080;
					}
				}

				.address {
					margin-top: 16upx;
					width: 100%;
					font-size: 26upx;
					font-weight: medium;
					line-height: 33upx;
					letter-spacing: -2upx;
					color: #1a1a1a;
				}
			}

			.seperator {
				margin-left: 48upx;
				width: 2upx;
				height: 51upx;
				background-color: #e6e6e6;
			}

			.edit {
				font-size: 24upx;
				font-weight: medium;
				line-height: 47upx;
				letter-spacing: -2upx;
				color: #999999;
				margin-left: 25upx;
				flex-shrink: 0;
			}
		}

		.add {
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: center;
			width: 702upx;
			height: 109upx;
			margin-left: 24upx;
			background-color: #ffffff;
			border-radius: 6upx;
			font-size: 32upx;
			font-weight: medium;
			letter-spacing: 1px;
			color: #0092ff;

			.icon {
				font-size: 29upx;
				margin-right: 20upx;
			}
		}
		.line-shopping{
			background:rgba(255,255,255,1);
			padding: 0 60upx;
		}
		.line-shopping view{
			width:100%;
			height:3upx;
			background:rgba(237,237,237,1);
		}
		.freight{
			background:rgba(255,255,255,1);
			width: 100%;
			height: 111upx;
			padding: 0 43upx 0 41upx;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;
		}
		.kuaidi{
			font-size:30upx!important;
			font-family:PingFang SC;
			font-weight:bold;
			color:rgba(0,0,0,1)!important;
			line-height:42px;
		}
		.kuaidi text:first-child{
			font-size:30upx!important;
			font-family:PingFang SC;
			font-weight:bold;
			color:rgba(0,0,0,1)!important;
			line-height:42px;
		}
		.kuaidi text:last-child{
			color:rgba(153,153,153,1);
			margin-left: 21upx;
		}
		.qian{
			font-size:30upx;
			font-family:PingFang SC;
			font-weight:500;
			color:rgba(255,95,5,1);
			line-height:42upx;
		}
		
		.qian text:last-child{
			margin-left: 12upx;
			letter-spacing: 3upx;
		}
		.infos-detail {
			display: flex;
			background: #fff;
			// margin-top: 20upx;
			padding: 0upx 30upx;
			height: 100%;
			.infos-left {
				width: 25%;
				padding: 30upx 30upx 30upx;

				.infos-img {
					width: 112upx;
					height: 112upx;
					
				}
				.infos-img image{
					border-radius:7upx;
				}
			}

			.infos-right {
				width: 70%;
				padding: 30upx 0;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				.infos-title {
					font-size: 34upx;
					font-family: PingFang SC;
					font-weight: bold;
					color: rgba(51, 51, 51, 1);
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}

				.infos-price {
					font-size: 34upx;
					font-family: PingFang SC;
					font-weight: bold;
					color: rgba(255, 94, 4, 1);
					line-height: 42upx;

					text:last-child {
						margin-left: 4upx;
						font-size: 28upx;
						color: #666;
						font-weight: 400;
					}
				}
			}
		}

		.infos {
			width: 702upx;
			height: auto;
			position: relative;
			background-color: #ffffff;
			border-radius: 10upx;
			box-sizing: border-box;
			margin-left: 24upx;
			margin-top: 20upx;
			padding: 32upx 30upx 40upx 30upx;

			.title {
				font-size: 34upx;
				font-weight: bold;
				letter-spacing: -1px;
				color: #333333;
				// line-height: 38upx;
			}

			.line {
				width: 100%;
				height: 2upx;
				background-color: #f7f7f7;
			}

			.info {
				margin-top: 24upx;
				display: flex;
				flex-direction: row;
				width: 100%;
				align-items: baseline;
				justify-content: space-between;

				.tips {
					font-size: 30upx;
					font-weight: medium;
					letter-spacing: -2px;
					color: #1a1a1a;
				}

				.unit {
					font-size: 24upx;
					font-weight: bold;
					letter-spacing: -1px;
					color: #ff4d1d;
				}

				.price {
					font-size: 32upx;
					font-weight: bold;
					letter-spacing: -2px;
					color: #ff4d1d;
				}
			}
		}

		.payamt {
			margin-top: 32upx;
			font-size: 26upx;
			font-weight: medium;
			line-height: 42upx;
			letter-spacing: -2upx;
			color: #1a1a1a;
			width: 100%;
			text-align: right;
		}

		.right {
			font-size: 34upx;
			line-height: 34upx;
			color: #333333;
			position: absolute;
			top: 38upx;
			right: 55upx;
			font-weight: bold;
		}

		.bottom {
			height: 110upx;
			width: 100%;
			background-color: white;
			display: flex;
			flex-direction: row;
			position: fixed;
			bottom: 0upx;
			.btn-left {
				width: 419upx;
				height: 100%;
				display: flex;
				align-items: center;

				.text-view {
					display: flex;
					align-items: baseline;
					margin-left: 24upx;

					.text-nor {
						font-size: 28upx;
						line-height: 28upx;
						font-weight: medium;
						color: #808080;
					}

					.text-unit {
						font-size: 26upx;
						line-height: 26upx;
						font-weight: medium;
						letter-spacing: -1upx;
						color: #FF5E04;
					}

					.price {
						font-size: 48upx;
						line-height: 48upx;
						font-weight: bold;
						letter-spacing: -2upx;
						color: #FF5E04;
					}
				}
			}

			.btn-right {
				flex-grow: 1;
				height: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				background:linear-gradient(-90deg,rgba(255,94,4,1),rgba(249,140,45,1));
				font-size: 36upx;
				font-weight: medium;
				letter-spacing: 1upx;
				color: #ffffff;
			}
		}
	}
		.top{
			height: 163upx;
			display: flex;
			flex-direction: row;
			align-items: center;
			background:rgba(255,255,255,1);
			padding: 0 30upx;
			font-size:34upx;
			font-family:PingFang SC;
			font-weight:500;
			color:rgba(51,51,51,1);
		}
		.top-img{
			width: 101upx;
			height: 101upx;
		}
		.top-img image{
			height: 100%;
			border-radius:7px;
		}
		.top-title{
			height: 95upx;
			display: flex;
			justify-content: space-between;
			margin-left: 18upx;
		}
		.top-title text{
			overflow: hidden;
			white-space: normal ;
			text-overflow: ellipsis;
			
			display: -webkit-box;
			
			-webkit-line-clamp: 2;
			
			/*! autoprefixer: off */
			
			-webkit-box-orient: vertical;
		}
		//
		.desc{
			height: 111upx;
			display: flex;
			flex-direction: row;
			align-items: center;
			background:rgba(255,255,255,1);
			padding: 0 24upx 0 60upx;
			font-family:PingFang SC;
			font-weight:bold;
			// margin-top: 20upx;
		}
		.desc text{
			font-size:30upx;
			color:rgba(26,26,26,1);
			margin-right: 27upx;
		}
		
		.desc input{
			width: 560upx;
			font-size:28upx;
			color:rgba(153,153,153,1);
			
		}
		.latter{
			color:rgba(153,153,153,1)!important;
		}
		.contain-box{
			position: relative;
		}
		.center-contain{
			height: 493upx;
		}
		.bottom-popup .refund-reason text{
			height: 112upx;
			display: flex;
			justify-content: center;
			align-items: center;
			font-size:36upx;
			font-family:PingFang SC;
			font-weight:500;
			color:rgba(77,77,77,1);
		}
		.bottom-popup .reason view text{
			font-size:32upx;
			font-family:PingFang SC;
			font-weight:500;
			color:rgba(38,38,38,1);
		}
		.reason{
			padding: 0upx 34upx 0 24upx;
			
		}
		.reason view{
			height: 97upx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			border-top: 1upx solid rgba(230,230,230,1);;
		}
		.reason-foot-position{
			position: absolute;
			bottom: 0;
		}
		.reason-foot{
			height: 110upx;
			display: flex;
			justify-content: center;
			align-items: center;
			background:linear-gradient(-90deg,rgba(255,94,4,1),rgba(249,140,45,1));
			
			width: 100%;
		}
		.bottom-popup .reason-foot text{
			font-size:36upx;
			font-family:PingFang SC;
			font-weight:500;
			color:rgba(255,255,255,1);
		}
		.bottom-popup .reason view .source{
			width:34upx;
			height:34upx;
			border-radius:50%;
			border:2upx solid rgba(204,204,204,1);
		}
		// .noReason{
		// 	margin-bottom: 50upx;
		// }
		.glance-shop-cart-itemselected-img{width: 34upx;height: 34upx;background-size:34upx 34upx;background-repeat:no-repeat;
		
		
			background-image: url()
			
			}
		.desc>.orange{
			font-size:36upx;
			font-weight:500;
			color:rgba(255,94,4,1);
		}
		.dayu{
			color:rgba(140,140,140,1)!important;
		}
		.between{
			display: flex;
			justify-content: space-between;
		}
		.desc view .latter-money{
			font-size:30upx;
			font-family:PingFang SC;
			font-weight:bold;
			color:rgba(255,95,5,1);
		}
		.between .left-text{
			display: flex;
			flex-direction: row;
			align-items: center;
		}
		.between .left-text .left-text-satis{
			font-size:30upx;
			font-family:PingFang SC;
			font-weight:500;
			color:#999999!important;
		}
		.between view .latter{
			margin-right: 13upx;
		}
		// .bottom {
		// 	position: fixed;
		// 	bottom: 0upx;
		// 	width: 100%;
		// 	height: 110upx;
		// 	background:linear-gradient(-90deg,rgba(255,94,4,1),rgba(249,140,45,1));
		// 	background-blend-mode: normal, normal;
		// 	display: flex;
		// 	align-items: center;
		// 	justify-content: center;
		// 	font-size: 36upx;
		// 	font-family:PingFang SC;
		// 	font-weight:500;
		// 	color:rgba(255,255,255,1);
		// }
	.run-sign-go {
			position: fixed;
			
			background-color: rgba(0,0,0,0.8);
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			width: 100%;
			z-index: 9999;
			
			}
	
</style>
